<!--
 * @Descripttion:
 * @version:
 * @Author:
 * @Date: 2019-10-24 17:25:56
 -->
<template>
  <el-form-item :rules="item.rules"
                :label="item.label"
                :prop="item.key">
    <el-input v-if="item.type==='input'"
              v-bind="$attrs"
              v-on="$listeners"
              :type="item.subtype"
              :placeholder="item.placeholder"
              :disabled="item.disable"
              :readonly="item.readonly"
              :autosize="item.autosize"></el-input>

    <el-select v-else-if="item.type==='select'"
               v-bind="$attrs"
               v-on="$listeners"
               :multiple="item.multiple"
               :disabled="item.disabled"
               :multiple-limit="item.multipleLimit">
      <el-option v-for="o in item.options"
                 :key="o.value"
                 :label="o.label"
                 :value="o.value"
                 :disabled="o.disabled">
      </el-option>
    </el-select>
  </el-form-item>
</template>

<script>
export default {
  props: {
    item: {
      type: Object,
      required: true
    }
  }
}
</script>
